<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>淮南市公安局情指一体化平台</title>
    <link href="${params.contextPath}/css/common.css" rel="stylesheet" type="text/css" />
    <script src="${params.contextPath}/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="${params.contextPath}/js/common.js" type="text/javascript"></script>
    <style type="text/css">
        .secondMenu{display: none}
    </style>
    <script type="text/javascript">
        function initThreeMenus(menus) {
            $("div.leftMenu > ul > li").each(function () {
                var parentId = $(this).attr("mid");
                var str = '';
                for (var i = 0; i < menus.length; i ++) {
                    var menu = menus[i];
                    if (menu.parentId == parentId && menu.category == 1) {
                        str += '<li><a href="${params.contextPath}'+menu.url+'" target="mainFrame">'+menu.name+'</a></li>';
                    }
                }
                if (str != '') {
                    $(this).after('<div class="secondMenu"><ul>' +str+ '</ul></div>');
                }
            });
        };

        function initSecondMenus(menus, parentId) {
            $("div.leftMenu > ul").html("");
            for (var i = 0; i < menus.length; i ++) {
                var menu = menus[i];
                if (menu.parentId != parentId || menu.category != 1) {
                    continue;
                }
                var url = menu.url;
                if (url) {
                    url = "${params.contextPath}" + url;
                } else {
                    url = "javascript:void(0)";
                }
                $("div.leftMenu > ul").append('<li mid="'+menu.id+'"><a href="'+url+'" class="ico5" target="mainFrame">'+menu.name+'</a></li>');
            }
            initThreeMenus(menus);
            $("div.leftMenu > ul > li").click(function () {
                $("div.secondMenu").hide();
                $(this).next().slideDown();
            });
        };
        $(function () {
            /*$.ajax({
                url:"${params.contextPath}/web/loginresource.json",
                type:"post",
                dataType:"json",
                async:true,
                success:function(data){
                    if (data.status != "success") {
                        alert(data.message);
                        return;
                    }
                    var _resource_list = data.data;
                    initSecondMenus(_resource_list, "${params.resourceId!}");
                }
            });*/
        });
    </script>
</head>
<body  class="bgf0f0f0">
<div class="leftMenu">
    <ul>
        <li><a href="#" class="ico1">我的桌面</a></li>
        <div class="secondMenu">
            <ul>
                <li><a href="#">客户管理1</a></li>
                <li><a href="#">客户管理2</a></li>
                <li><a href="#">客户管理3</a></li>
            </ul>
        </div>
        <li><a href="#" class="hover ico2">我的任务</a></li>
        <div class="secondMenu">
            <ul>
                <li><a href="#">我的任务1</a></li>
                <li><a href="#">我的任务2</a></li>
                <li><a href="#">我的任务3</a></li>
            </ul>
        </div>
        <li><a href="#" class="ico3">系统消息</a></li>
        <div class="secondMenu">
            <ul>
                <li><a href="#">系统消息1</a></li>
                <li><a href="#">系统消息2</a></li>
            </ul>
        </div>
        <li><a href="#" class="ico4">运维监控</a></li>
        <div class="secondMenu">
            <ul>
                <li><a href="#">运维监控1</a></li>
                <li><a href="#">运维监控2</a></li>
            </ul>
        </div>
        <li><a href="#" class="ico5">系统日志</a></li>
        <div class="secondMenu">
            <ul>
                <li><a href="#">系统日志1</a></li>
                <li><a href="#">系统日志2</a></li>
            </ul>
        </div>
        <li><a href="#" class="ico6">系统管理</a></li>
        <div class="secondMenu">
            <ul>
                <li><a href="${params.contextPath}/view/organization/org_list.htm" target="mainFrame">组织机构管理</a></li>
                <li><a href="${params.contextPath}/view/position/position_list.htm" target="mainFrame">职务管理</a></li>
                <li><a href="${params.contextPath}/view/menu/menu_list.htm" target="mainFrame">菜单管理</a></li>
                <li><a href="${params.contextPath}/view/resource/resource_list.htm" target="mainFrame">资源管理</a></li>
                <li><a href="${params.contextPath}/view/role/role_list.htm" target="mainFrame">角色管理</a></li>
                <li><a href="${params.contextPath}/view/area/area_list.htm" target="mainFrame">区域管理</a></li>
                <li><a href="${params.contextPath}/view/user/user_list.htm" target="mainFrame">用户管理</a></li>
            </ul>
        </div>
    </ul>
</div>
</body>
</html>
